
package com.quartet.utils.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p>
 * 平台统计
 * </p>
 * @author Zheng Jie
 * @date 2020-05-07
 */
@Getter
@AllArgsConstructor
public enum PlatformStatisticsEnum {

    SPEEDING("0", "超速"),
    FATIGUE_DRIVING("1", "疲劳驾驶"),
    ENCLOSURE("2", "围栏"),
    YAW("3", "偏航"),

    ONLINE_DEVICES("0", "在线设备"),
    OFFLINE_EQUIPMENT("1", "离线设备"),
    ALARM_EQUIPMENT("2", "报警设备"),

    DRIVING("0", "行驶中"),
    PARKING("1", "停车"),
    OFFLINE("2", "离线");

    private final String value;
    private final String description;

    public static PlatformStatisticsEnum find(String val) {
        for (PlatformStatisticsEnum dataScopeEnum : PlatformStatisticsEnum.values()) {
            if (val.equals(dataScopeEnum.getValue())) {
                return dataScopeEnum;
            }
        }
        return null;
    }

}
